cmake_minimum_required(VERSION 3.5)
project(MyApplication)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_BUILD_TYPE Release)

set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

include_directories(${NATIVERENDER_ROOT_PATH}
                    ${NATIVERENDER_ROOT_PATH}/include)

# 明确列出所有源文件
set(SOURCES
    napi_init.cpp
    BlankDetector.cpp
)

# 添加名为entry的库
add_library(entry SHARED ${SOURCES})

# 根据官方文档，添加 OpenMP 静态库支持
target_link_libraries(entry PUBLIC
    libomp.so
    libace_napi.z.so
    libhilog_ndk.z.so
)

# 调试信息
message(STATUS "Building library: entry")
message(STATUS "Sources: ${SOURCES}")
message(STATUS "OpenMP static library linked")